﻿using System;
namespace Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg {
    
    
    public partial class MokaType : global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IMokaType {
        
        private global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.ITreasury @__treasury;
        
        private global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IPayer @__payer;
        
        private global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IReceiver @__receiver;
        
        private global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IPayment @__payment;
        
        private string @__treasuryClassif;
        
        private MokaType.PaymentDescType @__paymentDesc;
        
        public MokaType() {
        }
        
        /// <summary>
        /// All parameters
        /// </summary>
        public MokaType(global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.ITreasury @treasury, global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IPayer @payer, global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IReceiver @receiver, global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IPayment @payment, string @treasuryClassif, MokaType.PaymentDescType @paymentDesc) {
            this.@__treasury = @treasury;
            this.@__payer = @payer;
            this.@__receiver = @receiver;
            this.@__payment = @payment;
            this.@__treasuryClassif = @treasuryClassif;
            this.@__paymentDesc = @paymentDesc;
        }
        
        /// <summary>
        /// Required parameters
        /// </summary>
        public MokaType(global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.ITreasury @treasury, global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IPayer @payer, global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IReceiver @receiver, global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IPayment @payment) {
            this.@__treasury = @treasury;
            this.@__payer = @payer;
            this.@__receiver = @receiver;
            this.@__payment = @payment;
        }
        
        /// <summary>
        /// Copy Constructor
        /// </summary>
        protected MokaType(IMokaType @mokaType) {
            this.@__treasury = @mokaType.Treasury;
            this.@__payer = @mokaType.Payer;
            this.@__receiver = @mokaType.Receiver;
            this.@__payment = @mokaType.Payment;
            this.@__treasuryClassif = @mokaType.TreasuryClassif;
            this.@__paymentDesc = @mokaType.PaymentDesc;
        }
        
        public virtual global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.ITreasury Treasury {
            get {
                return this.@__treasury;
            }
            set {
                this.@__treasury = value;
            }
        }
        
        public virtual global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IPayer Payer {
            get {
                return this.@__payer;
            }
            set {
                this.@__payer = value;
            }
        }
        
        public virtual global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IReceiver Receiver {
            get {
                return this.@__receiver;
            }
            set {
                this.@__receiver = value;
            }
        }
        
        public virtual global::Producers.Arireg.Xtee.Riik.Ee.Producer.Arireg.IPayment Payment {
            get {
                return this.@__payment;
            }
            set {
                this.@__payment = value;
            }
        }
        
        public virtual string TreasuryClassif {
            get {
                return this.@__treasuryClassif;
            }
            set {
                this.@__treasuryClassif = value;
            }
        }
        
        public virtual MokaType.PaymentDescType PaymentDesc {
            get {
                return this.@__paymentDesc;
            }
            set {
                this.@__paymentDesc = value;
            }
        }
        
        public class PaymentDescType : global::Xtee.Core.Schema.XsdString {
            
            public PaymentDescType(string value) : 
                    base(value) {
                this.PikkusSuuremVõrdneKui = 0;
                this.PikkusVaiksemVordneKui = 255;
                this.Validate();
            }
            
            public PaymentDescType() : 
                    base(string.Empty) {
            }
            
            public static bool TryParse(string value, out PaymentDescType result) {
                try {
                    result = new PaymentDescType(value);
                    return true;
                }
                catch (System.Exception ) {
                    result = null;
                    return false;
                }
            }
            
            public static implicit operator String (PaymentDescType value) {
                return value.Value;
            }
            
            public static implicit operator PaymentDescType (string value) {
                if (value==null) {
                    return null;
                }
                return new PaymentDescType(value);
            }
        }
    }
}
